home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1999 #2 / Amiga Plus CD - 1999 - No. 2.iso / System-Boost / Profi Tools / DiskSpeed / src / makeboxes.c < prev    next >
C/C++ Source or Header  |  1998-07-30  |  3KB  |  93 lines

  1. /*
  2.  * MKSoft Development Amiga ToolKit V1.0
  3.  *
  4.  * Copyright (c) 1985,86,87,88,89,90 by MKSoft Development
  5.  *
  6.  *                          DiskSpeed v4.2
  7.  *                          ScsiSpeed v4.2
  8.  *                                by
  9.  *                           Michael Sinz
  10.  *
  11.  *            Copyright (c) 1989-1992 by MKSoft Development
  12.  *
  13.  *            MKSoft Development
  14.  *            163 Appledore Drive
  15.  *            Downingtown, PA 19335
  16.  *
  17.  * Yes, this is yet another disk speed testing program, but with a few
  18.  * differences.  It was designed to give the most accurate results of the
  19.  * true disk performance in the system.  For this reason many of
  20.  * DiskSpeed's results may look either lower or higher than current disk
  21.  * performance tests.
  22.  *
  23.  ******************************************************************************
  24.  *                                          *
  25.  *    Reading legal mush can turn your brain into guacamole!              *
  26.  *                                          *
  27.  *        So here is some of that legal mush:                  *
  28.  *                                          *
  29.  * Permission is hereby granted to distribute this program's source          *
  30.  * executable, and documentation for non-commercial purposes, so long as the  *
  31.  * copyright notices are not removed from the sources, executable or          *
  32.  * documentation.  This program may not be distributed for a profit without   *
  33.  * the express written consent of the author Michael Sinz.              *
  34.  *                                          *
  35.  * This program is not in the public domain.                      *
  36.  *                                          *
  37.  * Fred Fish is expressly granted permission to distribute this program's     *
  38.  * source and executable as part of the "Fred Fish freely redistributable     *
  39.  * Amiga software library."                              *
  40.  *                                          *
  41.  * Permission is expressly granted for this program and it's source to be     *
  42.  * distributed as part of the Amicus Amiga software disks, and the          *
  43.  * First Amiga User Group's Hot Mix disks.                      *
  44.  *                                          *
  45.  ******************************************************************************
  46.  */
  47.  
  48. /*
  49.  * Make border structures with the correct box info...
  50.  */
  51.  
  52. #include    <exec/types.h>
  53. #include    <intuition/intuition.h>
  54.  
  55. #include    "MakeBoxes.h"
  56.  
  57. /*
  58.  * Note:  The routines do fill in the '0' values even though
  59.  *      the array was, most likely, already zero'd
  60.  */
  61.  
  62. /*
  63.  * This function makes a top-left border array based on the
  64.  * x/y size of the box...
  65.  */
  66. VOID    FillTopLeft_Border(struct Border *bd,SHORT xSize,SHORT ySize)
  67. {
  68. register    SHORT    *xy;
  69.  
  70.     xy=bd->XY;
  71.     xy[0]=xSize-2;        xy[1]=0;
  72.     xy[2]=0;        xy[3]=0;
  73.     xy[4]=0;        xy[5]=ySize-1;
  74.     xy[6]=1;        xy[7]=ySize-2;
  75.     xy[8]=1;        xy[9]=1;
  76. }
  77.  
  78. /*
  79.  * This function makes a bottom-right border array based on the
  80.  * x/y size of the box...
  81.  */
  82. VOID    FillBottomRight_Border(struct Border *bd,SHORT xSize,SHORT ySize)
  83. {
  84. register    SHORT    *xy;
  85.  
  86.     xy=bd->XY;
  87.     xy[0]=1;        xy[1]=ySize-1;
  88.     xy[2]=xSize-1;        xy[3]=ySize-1;
  89.     xy[4]=xSize-1;        xy[5]=0;
  90.     xy[6]=xSize-2;        xy[7]=1;
  91.     xy[8]=xSize-2;        xy[9]=ySize-2;
  92. }
  93.